package com.frkj.yuan.adapter;

import android.view.ViewGroup;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.frkj.yuan.fragment.my.StoredMoneyChiZhiFragment;
import com.frkj.yuan.fragment.my.StoredMoneyXiaoFeiFragment;

import java.util.List;

/**
 * 界面: 界面
 * company: 兰州丰荣信息科技有限公司
 * 创建时间: on 2022/2/25 10 ：46
 * 项目名称：yuanban
 */
public class StoredMoneyAdapter extends FragmentPagerAdapter {
    private List<Fragment> fmList;
    public StoredMoneyAdapter(FragmentManager fragmentManager, List<Fragment> list) {
        super(fragmentManager);
        fmList = list;
    }
    @Override
    public Fragment getItem(int arg0) {
        if (arg0 == 0) {
            return new StoredMoneyChiZhiFragment();
        } else if (arg0 == 1) {
            return new StoredMoneyXiaoFeiFragment();
        }
        return null;
    }
    @Override
    public int getCount() {
        return fmList.size();
    }
    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {}
}

